package com.chenjun.core.dao.generator.mapper;

import com.chenjun.core.dao.generator.entity.OaDictEmplAttnTypeCfg;
import com.chenjun.core.dao.generator.entity.OaDictEmplAttnTypeCfgExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface OaDictEmplAttnTypeCfgMapper {
    @Delete({
        "delete from oa_dict_empl_attn_type_cfg",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    @Insert({
        "insert into oa_dict_empl_attn_type_cfg (id, code, ",
        "name, status, create_time, ",
        "update_time, operator, ",
        "note, attn_type_id, ",
        "attn_type_name, man_hours_type_id, ",
        "man_hours_type_name)",
        "values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, ",
        "#{name,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP}, #{operator,jdbcType=INTEGER}, ",
        "#{note,jdbcType=VARCHAR}, #{attnTypeId,jdbcType=INTEGER}, ",
        "#{attnTypeName,jdbcType=VARCHAR}, #{manHoursTypeId,jdbcType=INTEGER}, ",
        "#{manHoursTypeName,jdbcType=VARCHAR})"
    })
    int insert(OaDictEmplAttnTypeCfg record);

    int insertSelective(OaDictEmplAttnTypeCfg record);

    List<OaDictEmplAttnTypeCfg> selectByExample(OaDictEmplAttnTypeCfgExample example);

    @Select({
        "select",
        "id, code, name, status, create_time, update_time, operator, note, attn_type_id, ",
        "attn_type_name, man_hours_type_id, man_hours_type_name",
        "from oa_dict_empl_attn_type_cfg",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @ResultMap("BaseResultMap")
    OaDictEmplAttnTypeCfg selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(OaDictEmplAttnTypeCfg record);

    @Update({
        "update oa_dict_empl_attn_type_cfg",
        "set code = #{code,jdbcType=VARCHAR},",
          "name = #{name,jdbcType=VARCHAR},",
          "status = #{status,jdbcType=INTEGER},",
          "create_time = #{createTime,jdbcType=TIMESTAMP},",
          "update_time = #{updateTime,jdbcType=TIMESTAMP},",
          "operator = #{operator,jdbcType=INTEGER},",
          "note = #{note,jdbcType=VARCHAR},",
          "attn_type_id = #{attnTypeId,jdbcType=INTEGER},",
          "attn_type_name = #{attnTypeName,jdbcType=VARCHAR},",
          "man_hours_type_id = #{manHoursTypeId,jdbcType=INTEGER},",
          "man_hours_type_name = #{manHoursTypeName,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(OaDictEmplAttnTypeCfg record);
}